﻿
<!DOCTYPE html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>注册</title>
<!-- jQuery -->
<script src="../js/jquery.min.js"></script>
<!-- jQuery Easing -->
<script src="../js/jquery.easing.1.3.js"></script>

</head>
<body>
	<script>
			function regist(){
				var userid = $("#userid").val();
				var username = $("#username").val();
				var password = $("#password").val();
				$.ajax({
					url:"/NewsManager/user/updateUser",
					type:"POST",				
					data:{
						"userid":userid,
						"username":username,
						"password":password,
						},
					dataType:"json",
					success:function(data){
						alert("修改成功！！");
						window.location.href="${pageContext.request.contextPath}/user/togetalluser";
					},
					error:function(){
						alert("修改失败！！");
					}
				});
			}
			
		</script>


	<form action="" method="POST">
		用户名:<input type="text" name="userid" id="userid"
			value="${user.userid}" disabled="disabled"><br /> 用户名:<input
			type="text" name="username" id="username" value="${user.username}"><br />
		密&nbsp;&nbsp;&nbsp;&nbsp;码:<input type="text" name="password"
			id="password" value="${user.password}"><br /> <input
			type="button" value="修改" onclick="regist()" />

	</form>
	<div id="title1"></div>
</body>
</html>

